<?php
/**
 * 培训管理
 * 
 * @author  Lee<a605333742@gmail.com>
 * @time    2016-08-09
 */
namespace Admin\Controller; 

class DataController extends CommonController{
    /*
     * 构造函数
     * 
     * @return #
     */
    public function _initialize() {
        parent::_initialize();
        $this->db_mod   =D("TrainMod");
    }
    
    /*
     * 资料列表
     * 
     * @return #
     */
    public function index(){
        if(I("request.assign_user")){
            $_REQUEST['assign_user_id'] =A("Common")->getIds(I("request.assign_user"),"name","User");
        }
        A("Common")->index("","top",FALSE);
    }
    
    /*
     * show前置操作
     * 
     * @return #
     */
    public function _before_show(){
        $modList=$this->db_mod->where(array("status"=>1))->select(array("file"=>"id,name"));
        $this->assign("modList",$modList);
    }
    
    /*
     * 模块列表
     * 
     * @return #
     */
    public function model(){
        A("Common")->index("TrainMod");
    }
}